package com.administrator.customviewtest.other.module;

/**
 * Created by lsp on 2017/9/11 10 42
 */

public class Single2 {

    private volatile Single2 single2;  //保证创建出来的对象是最新的

    public Single2 getInstance() {
        if (single2 == null) {
            synchronized (Single2.class) {
                if (single2 == null) {
                    single2 = new Single2();
                }
            }
        }
        return single2;
    }
}
